<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>

<%
	//在公网上还是存在有缓冲现象。
	response.setHeader("Pragma", "No-cache");
	response.setHeader("Cache-Control", "no-cache");
	response.setDateHeader("Expires", 0);
%>

<html>
	<head>
		<title>杰马逊黄页后台管理</title>
		
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/skin.css">
		<link href="${pageContext.request.contextPath}/css/jquery.alerts.css" rel="stylesheet" type="text/css" media="screen">		
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery/jquery-1.4.2.min.js"></script>
		<script src="${pageContext.request.contextPath}/js/jquery/jquery.ui.draggable.js" type="text/javascript"></script>
		<script src="${pageContext.request.contextPath}/js/jquery/jquery.alerts.js" type="text/javascript"></script>
		<script src="${pageContext.request.contextPath}/js/tools.js" type="text/javascript"></script>
		
		<script type="text/javascript">
			function init(){
				var message = "${LOGIN_ERROR}";
				if(message != ""){					
					 jAlert('error', message, '错误提示');			
				}
				document.loginform.loginName.focus();
			}

			function onSubmit(){
				var loginform = document.loginform;
				
				if(loginform.loginName.value.trim() == ""){
					jAlert('error', '用户名不能为空!', '错误提示');					
					loginform.loginName.focus();
					return false;
				}

				if(loginform.pass.value.trim() == ""){
					jAlert('error', '密码不能为空!', '错误提示');
					loginform.pass.focus();
					return false;
				}

				if(loginform.validNum.value.trim() == ""){
					jAlert('error', '验证码不能为空!', '错误提示');				
					loginform.validNum.focus();
					return false;
				}
				
				return true;			
			}
		</script>
		<style type="text/css">
			<!--
			body {
				margin-left: 0px;
				margin-top: 0px;
				margin-right: 0px;
				margin-bottom: 0px;
				background-color: #1D3647;
			}
			-->
		</style>
		
	</head>
	
	<body onload="init()">
		<s:form name="loginform" action="login" method="post" namespace="/admin" onsubmit="return onSubmit()">
			<table width="100%" height="166" border="0" cellpadding="0" cellspacing="0">
  				<tr>
    				<td height="42" valign="top">
    					<table width="100%" height="42" border="0" cellpadding="0" cellspacing="0" class="login_top_bg">
      						<tr>
        						<td width="1%" height="21">&nbsp;</td>
        						<td height="42">&nbsp;</td>
        						<td width="17%">&nbsp;</td>
      						</tr>
    					</table>
    				</td>
  				</tr>
  				<tr>
    				<td valign="top">
    					<table width="100%" height="532" border="0" cellpadding="0" cellspacing="0" class="login_bg">
      						<tr>
        						<td width="49%" align="right">
        							<table width="91%" height="532" border="0" cellpadding="0" cellspacing="0" class="login_bg2">
            							<tr>
              								<td height="138" valign="top">
              									<table width="89%" height="427" border="0" cellpadding="0" cellspacing="0">
                									<tr>
                  										<td height="149">&nbsp;</td>
                									</tr>
                									<tr>
                  										<td height="80" align="right" valign="top"></td>
                									</tr>
                									<tr>
                  										<td height="198" align="right" valign="top">
                  											<table width="100%" border="0" cellpadding="0" cellspacing="0">
                    											<tr>
                      												<td width="35%">&nbsp;</td>
                      												<td height="25" colspan="2" class="left_txt"><p></p></td>
                    											</tr>
                    											<tr>
                      												<td>&nbsp;</td>
                      												<td height="25" colspan="2" class="left_txt"><p></p></td>
                    											</tr>
                    											<tr>
                      												<td>&nbsp;</td>
                      												<td height="25" colspan="2" class="left_txt"><p></p></td>
                    											</tr>
                    											<tr>
                      												<td>&nbsp;</td>
                      												<td width="30%" height="40"></td>
                      												<td width="35%"></td>
                    											</tr>
                  											</table>
                  										</td>
                									</tr>
              									</table>
              								</td>
            							</tr>
        							</table>
        						</td>
        						<td width="1%" >&nbsp;</td>
        						<td width="50%" valign="bottom">
        							<table width="100%" height="59" border="0" align="center" cellpadding="0" cellspacing="0">
            							<tr>
              								<td width="4%">&nbsp;</td>
              								<td width="96%" height="38"><span class="login_txt_bt">杰马逊管理系统</span></td>
            							</tr>
            							<tr>
              								<td>&nbsp;</td>
              								<td height="21">
              									<table cellSpacing="0" cellPadding="0" width="100%" border="0" id="table211" height="328">
                  									<tr>
                    									<td height="164" colspan="2" align="middle">
                        									<table cellSpacing="0" cellPadding="0" width="100%" border="0" height="143" id="table212">
                          										<tr>
                            										<td width="13%" height="38" class="top_hui_text"><span class="login_txt">管理员：&nbsp;&nbsp; </span></td>
                            										<td height="38" colspan="2" class="top_hui_text"><input name="loginName" class="editbox4" size="20">
                            										</td>
                          										</tr>
                          										<tr>
                            										<td width="13%" height="35" class="top_hui_text"><span class="login_txt"> 密&nbsp;&nbsp;&nbsp;&nbsp;码： &nbsp;&nbsp; </span></td>
                            										<td height="35" colspan="2" class="top_hui_text"><input class="editbox4" type="password" size="20" name="pass">
                             											<img src="${pageContext.request.contextPath}/admin/images/login/luck.gif" width="19" height="18"> </td>
                          										</tr>
                          										<tr>
                            										<td width="13%" height="35" ><span class="login_txt">验证码：</span></td>
                            										<td height="35" colspan="2" class="top_hui_text"><input class="wenbenkuang" name="validNum" type="text" maxLength="4" size="10" onkeyup="value=value.replace(/[^\d]/g,'')" 
																			onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))" />
																			&nbsp;&nbsp;
																			<img src="${pageContext.request.contextPath}/login/verifycode"/>
                              										</td>
                          										</tr>
                         	 									<tr>
                            										<td height="35" >&nbsp;</td>
                            										<td width="20%" height="35" ><input name="sb" type="submit" class="button" id="Submit" value="登 陆"> </td>
                            										<td width="67%" class="top_hui_text"><input name="rb" type="reset" class="button" id="rb" value="重 填" ></td>
                          										</tr>
                        									</table>
                        									<br>
                    									</td>
                  									</tr>
                  									<tr>
                    									<td width="433" height="164" align="right" valign="bottom"><img src="${pageContext.request.contextPath}/admin/images/login/login-wel.gif" width="242" height="138"></td>
                    									<td width="57" align="right" valign="bottom">&nbsp;</td>
                  									</tr>
              									</table>
              								</td>
            							</tr>
          							</table>
          						</td>
      						</tr>
    					</table>
    				</td>
  				</tr>
  				<tr>
    				<td height="20">
    					<table width="100%" border="0" cellspacing="0" cellpadding="0" class="login-buttom-bg">
      						<tr>
        						<td align="center"><span class="login-buttom-txt">Copyright &copy; 2011-2012 www.jmazon.com</span></td>
      						</tr>
    					</table>
    				</td>
  				</tr>
			</table>

		</s:form>
	</body>
</html>